#include <cstdio>
#include <cmath>
#include <cstring>

int input_data[1001];

int main(int argc, char const *argv[]){
    int n;
    while(scanf("%d", &n) != EOF){
        for (int i = 1; i <= n; i++)
            scanf("%d", &input_data[i]);
        int search_depth;
        scanf("%d", &search_depth);
        int max_depth = log(n)/log(2) + 1;
        if (search_depth <= max_depth){
            int start_index = pow(2, search_depth-1);
            int end_index = pow(2, search_depth) - 1;
            for (int i = start_index; i < end_index; i++)
                printf("%d ", input_data[i]);
            printf("%d\n", input_data[end_index]);
        } else
            printf("EMPTY\n");
    }
    return 0;
}
